/**
 * 
 */
package robocup.component.tactics;

import robocup.component.SConf;
import robocup.component.geometry.Vektor;
import robocup.component.worldobjects.Player;

/**
 * @author wetzker
 * 
 */
public abstract class DefaultPositions {

  // the positions we would like to reach when attacking
  public static final Vektor[] finalPositionsAttacking        = new Vektor[] { new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0),

                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -9, 0), new Vektor(
                                                                  Vektor.XY,
                                                                  -3, 0), new Vektor(
                                                                  Vektor.XY, 3,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 9,
                                                                  0),

                                                              // midfield
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -10, 45), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  42), new Vektor(
                                                                  Vektor.XY, 10,
                                                                  45),

                                                              // attack
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -7, 50), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  50), new Vektor(
                                                                  Vektor.XY,
                                                                  7, 50) };

  // the positions we would like to reach when defending
  public static final Vektor[] finalPositionsDefense          = new Vektor[] { new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0),

                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -9, -44), new Vektor(
                                                                  Vektor.XY,
                                                                  -3, -44), new Vektor(
                                                                  Vektor.XY, 3,
                                                                  -44), new Vektor(
                                                                  Vektor.XY, 9,
                                                                  -44),

                                                              // midfield
                                                              new Vektor(
                                                                  Vektor.XY, -SConf.getInstance().GOAL_WIDTH, 
                                                                  -SConf.getInstance().half_length), 
                                                                  new Vektor(
                                                                  Vektor.XY, 0,
                                                                  -SConf.getInstance().half_length), 
                                                                  new Vektor(
                                                                  Vektor.XY, SConf.getInstance().GOAL_WIDTH,
                                                                  -SConf.getInstance().half_length),

                                                              // attack
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -9, -5), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  -5), new Vektor(
                                                                  Vektor.XY, 9,
                                                                  -5) };

  // the positions we would like to reach when attacking
  public static final Vektor[] finalPositionsCornerOwnLeft    = new Vektor[] { new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY,
                                                                  -15, 0), new Vektor(
                                                                  Vektor.XY,
                                                                  -5, 0), new Vektor(
                                                                  Vektor.XY, 5,
                                                                  0), new Vektor(
                                                                  Vektor.XY,
                                                                  15, 0),

                                                              // midfield
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -20, 48), new Vektor(
                                                                  Vektor.XY,
                                                                  -30, 36), new Vektor(
                                                                  Vektor.XY,
                                                                  -10, 36),

                                                              // attack
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -30, 50), // kicks
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -16, 48), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  42) };

  // the positions we would like to reach when attacking
  public static final Vektor[] finalPositionsCornerOwnRight   = new Vektor[] { new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY,
                                                                  -15, 0), new Vektor(
                                                                  Vektor.XY,
                                                                  -5, 0), new Vektor(
                                                                  Vektor.XY, 5,
                                                                  0), new Vektor(
                                                                  Vektor.XY,
                                                                  15, 0),

                                                              // midfield
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  10, 36), new Vektor(
                                                                  Vektor.XY,
                                                                  30, 36), new Vektor(
                                                                  Vektor.XY,
                                                                  20, 48),

                                                              // attack
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -1, 42), new Vektor(
                                                                  Vektor.XY,
                                                                  18, 48), new Vektor(
                                                                  Vektor.XY,
                                                                  30, 50) // kicks
                                                              };

  // the positions we would like to reach when attacking
  public static final Vektor[] finalPositionsCornerOtherLeft  = new Vektor[] { new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0),

                                                              // midfield
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -18, -39), new Vektor(
                                                                  Vektor.XY,
                                                                  -6, -39), new Vektor(
                                                                  Vektor.XY,
                                                                  +4, -39),

                                                              // attack
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -22, -10), // kicks
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -12, -10), new Vektor(
                                                                  Vektor.XY,
                                                                  +0, -10) };

  // the positions we would like to reach when attacking
  public static final Vektor[] finalPositionsCornerOtherRight = new Vektor[] { new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0), new Vektor(
                                                                  Vektor.XY, 0,
                                                                  0),

                                                              // midfield
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -4, -39), new Vektor(
                                                                  Vektor.XY, 6,
                                                                  -39), new Vektor(
                                                                  Vektor.XY,
                                                                  18, -39),

                                                              // attack
                                                              new Vektor(
                                                                  Vektor.XY,
                                                                  -0, -10), new Vektor(
                                                                  Vektor.XY,
                                                                  +10, -10), new Vektor(
                                                                  Vektor.XY,
                                                                  +22, -10) };
  /**
   * This method retrieves the Start-Position of a player depending on his
   * player type.
   * 
   * @param role - the role of the player
   * @param selfKickOff - if the own team has kickoff
   * @return a vektor containing the position
   */
  public static Vektor getStartPosition(final Player.ROLE role,
	      final boolean selfKickOff) {

	    final int xy = Vektor.XY;

	    switch (role) {
	      case GOALIE:
	        return new Vektor(xy, 0.0, -50);
	      case INLE_BACK_FOUR:
	        return new Vektor(xy, -7.0, -15.0);
	      case INRE_BACK_FOUR:
	        return new Vektor(xy, 7.0, -15.0);
	      case LEFT_BACK_FOUR:
	        return new Vektor(xy, -20.0, -15.0);
	      case RIGHT_BACK_FOUR:
	        return new Vektor(xy, 20.0, -15.0);
	      case CENTER_MIDFIELD:
	        return new Vektor(xy, 0.0, -12.0);
	      case LEFT_MIDFIELD:
	        return new Vektor(xy, -20.0, -6.0);
	      case RIGHT_MIDFIELD:
	        return new Vektor(xy, 20.0, -6.0);
	      case LEFT_ATTACKER:
	        return new Vektor(xy, -10.0, -2.0);
	      case CENTER_ATTACKER:
	        if (selfKickOff) {
	          return new Vektor(xy, 0.0, -3.0);
	        }
	        else {
	          return new Vektor(xy, 0.0, -9.0);
	        }
	      case RIGHT_ATTACKER:
	        return new Vektor(xy, 10.0, -2.0);
	      
	      default : // server will place randomly
	        	return new Vektor(xy, 25,25);
	    }
	  }
  


}
